package com.example.userservice.novel.repository;

import com.example.userservice.novel.entity.CharacterEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CharacterRepository extends JpaRepository<CharacterEntity, Long> {

    // 根据小说ID查找角色
    List<CharacterEntity> findByNovelStructureId(Long novelStructureId);

    // 根据角色名称查找
    List<CharacterEntity> findByNameContainingIgnoreCase(String name);
}
